Skip to content

Conversation

@irar2
Copy link
Collaborator

@irar2 irar2 commented Nov 6, 2025

Closes #218

irar2 added 2 commits November 6, 2025 09:20
Signed-off-by: irar2 <[email protected]>
Signed-off-by: irar2 <[email protected]>
@irar2 irar2 requested a review from mayabar November 6, 2025 07:28
}

func (bc *blockCache) start(ctx context.Context) {
bc.logger.V(logging.TRACE).Info("Starting KV cache")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this log message is not supposed to be printed a lot, consider to report on INFO level

}

func (bc *blockCache) discard() {
bc.logger.V(logging.TRACE).Info("Discarding KV cache")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same, maybe use INFO

}

func (bc *blockCache) activate() {
bc.logger.V(logging.TRACE).Info("Activating KV cache")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

"github.com/vmihailenco/msgpack/v5"
)

func ParseKVEvent(parts [][]byte, expectedTopic string, expectedSeq uint64) ([]uint64, []uint64, bool) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe move this function to common.test_utils like CreateSub?

} else if string(tags) == "kv_cache" {
wakeUpKVCache = true
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in case tags are not defined, both wakeUpWeights and wakeUpKVCache should be true

// Activate the kv cache if either the sim is sleeping and the wake up tags are not
// "only weights", or the sim is not sleeping but the cache is still disabled
// and the tags are "only kv cache"
if s.config.EnableKVCache && (s.isSleeping && !wakeUpWeights) || (!s.isSleeping && s.kvCacheDisabled && wakeUpKVCache) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't it be s.config.EnableKVCache && (....)?

// variable VLLM_SERVER_DEV_MODE
isInDevMode bool
// in sleep mode, and if woken up with weights only, kv cache is disabled
kvCacheDisabled bool
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a duplication of bloockCach.disabled?

Copy link
Collaborator

@mayabar mayabar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@mayabar
Copy link
Collaborator

mayabar commented Nov 6, 2025

/lgtm
/approve

@github-actions github-actions bot added the lgtm label Nov 6, 2025
@github-actions github-actions bot merged commit b3f93d6 into llm-d:main Nov 6, 2025
4 checks passed
@irar2 irar2 deleted the sleep branch November 6, 2025 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support for vLLM sleep and wakeup endpoints in simulation mode

2 participants